package com.example.q_kang.hhh.home;

import com.example.q_kang.hhh.api.JsonCallBack;
import com.lzy.okgo.model.Response;
import com.sskj.base.BasePresenter;
import com.example.q_kang.hhh.home.InviteFriendFragment;
import com.sskj.base.api.Constant;
import com.sskj.base.base.HttpData;
import com.sskj.base.bean.QrCodeBean;


/**
 * @author Hey
 * Create at  2019/04/09
 */
class InviteFriendPresenter extends BasePresenter<InviteFriendFragment> {

    public void getQrCode() {
        httpService.getQrCode()
                .tag(this)
                .execute(new JsonCallBack<HttpData<QrCodeBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<QrCodeBean>> response) {
                        HttpData<QrCodeBean> body = response.body();
                        if (body.getStatus() == Constant.OK) {
                            mView.getQrCodeSuccess(body.getData());
                        }

                    }
                });
    }
}
